Release 10.1A: OpenEdge Development:
Progress Dynamics Basic Development
Other SBO issues
This section describes the following SBO issues:
SBO as navigation-target
An SBO can be a
Navigation-Target. Since you might want to navigate more than one of the contained SDOs, it is necessary to allow theNavigation-Source(SmartToolbar) to specify which SDO is to be associated with thisNavigation-Sourcewithout changing the existing interface between these objects. (See the "Brokering SDO data in an SBO" section for more information.) To accomplish this, there is a new property for thePanelclass used by toolbars calledNavigationTargetObject, which can optionally be set to theObjectNameof an SDO.NavigationTargetObjectis an instance property. When the Instance Property dialog box is run, this property is displayed as a drop-down list and enabled if theNavigation-Targetis an SBO (that is, if it is an object that has aContainedDataobjectsproperty). Otherwise it is disabled. If it is not explicitly set, the default is to pass theNavigationlink on to theMasterDataObject. Use this value to create an entry pair in the SBOObjectMappingproperty associating the two objects, so that the SBO knows which SDO to pass Navigation events.Locating a contained data object
Generally, you should consider the SBO to be reasonably opaque, so that it accepts requests from other objects and coordinates those with the contained SDOs. However, it is not possible to do this in every case, as that would unnecessarily complicate the API of the SBO. The SBO supports a function called
dataObjectHandle, which takes anObjectNameas an input parameter and returns the procedure handle of that SmartDataObject. You can use this handle for a client object that needs to communicate directly with an SDO. The majority of the SDO programming interface, however, is duplicated in the SBO so that generally a client object can run the same routines in an SBO that it would in an SDO, and have the SBO pass the call on to the appropriate contained objects.SDO programming interface in the SBO
Most of the common routines in the SDO are also supported with the same calling sequence in the SBO support code (in
sbo.porsbo.i). This allows application code to treat an SBO like a compound SDO in many ways. For example, a general restriction in some of the calls where column names are an input parameter, as described foraddQueryWhereandassignQuerySelection, is that you must qualify column names by the SDOObjectName. Generally, the SBO identifies the SDO associated with the caller by using theObjectMappingproperty. It passes the call on to that object, or else uses property data defined within the SBO to satisfy the request. Here is a list of SDO internal procedures and functions duplicated in the SBO’s API (in all cases, the calling sequence is the same).The internal procedures that are duplicated are:
The functions that are duplicated are:
addQueryWhere,assignQuerySelectionaddRow,copyRowcolumnDataType,columnLabel,columnColumnLabel,columnExtent,columnFormat,columnHelp,columnInitial,columnColumnLabel,columnMandatory,columnModified,columnPrivateData,columnQuerySelection,columnReadOnly,columnStringValue,columnTable,columnValExp,columnValMsg,columnValue,columnWidth,columnDbColumncolValues(can take either qualified or unqualified column names)deleteRow,cancelRowopenQuerysubmitRowSBO as data-target
An SBO can be a
Data-Targetfor an SDO just as another SDO can. It has theForeignFieldsproperty, which lets you specify fields to use as foreign keys, and theForeignValuesproperty, which stores the current values for those fields. TheForeignFieldswill always be applied to the SBO’sMasterDataObject. You cannot currently use the SBO as aData-Sourcefor another SBO.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |